// 
// File:   MyGraphClass.h
// Author: ben
//
// Created on April 28, 2008, 12:52 AM
//

#ifndef _MYGRAPHCLASS_H
#define	_MYGRAPHCLASS_H

#include <stdio.h>
#include <stdlib.h>


#include <vector>
#include <queue>
#include <stack>

#include <iostream>
#include <string>
#include <fstream>
#include <sstream>

#include "MyVertexClass.h"

using namespace std;

typedef class MyGraph{
public:
    MyGraph(int Givesize);
    ~MyGraph();
    void AddConnection(int iFrom,int iTo,double dweight);
    void ShowVertices();
    int NumberVertices(){return(VVertices.size());};
    void ExploreQueue();
    void ExploreQueue(int FirstVertex);
    void ExploreStack();
    void ExploreStack(int FirstVertex);
    void ClearMarker();
    
    int LoadLinks(string fname);
    int LoadNames(string fname);
    
    int ProduceDotFile();
    
    string NameForDot(int i);
    
    int SortNext(int inode,bool Permute);
    int SortNext();
    int getNext(int inode,int nextnum);
    double getNextWeight(int inode,int nextnum);
    int getNextMax(int inode);
    
    string getName(int i);
    void setName(int i, string newname);
    
private:
    void ShowQueue(std::queue<int> TheQueue);
    void ShowStack(std::stack<int> TheStack);
    std::vector<MyVertex> VVertices;
}MyGraph;

#endif	/* _MYGRAPHCLASS_H */

